package view
{
	import org.puremvc.as3.interfaces.IMediator;
	import org.puremvc.as3.patterns.mediator.Mediator; 
	
	public class ApplicationMediator extends Mediator implements IMediator 
	{ 
		
		public static const NAME : String = 'ApplicationMediator'; 
		
		/** 
		 * Constructor 
		 * Register views/mediators of the application 
		 * and bind them with the id of a component used in our main file .mxml 
		 */ 
		 public function ApplicationMediator(viewComponent : LucyID) 
		 { 
		 	super(NAME, viewComponent); 
		 	facade.registerMediator(new FormationPanelMediator(application.formationPanel));
		 	facade.registerMediator(new GroupePanelMediator(application.groupePanel));
		 	facade.registerMediator(new LoginPanelMediator(application.loginPanel));
		 	facade.registerMediator(new SallePanelMediator(application.sallePanel));
		 	facade.registerMediator(new SeancePanelMediator(application.seancePanel));
		 	facade.registerMediator(new EdtEnseignantPanelMediator(application.calendarPanel));
		 	facade.registerMediator(new EnseignementPanelMediator(application.enseignementPanel));
			facade.registerMediator(new AnneeEtudePanelMediator(application.anneeEtudePanel));
			facade.registerMediator(new SemestrePanelMediator(application.semestrePanel));
			facade.registerMediator(new EnseignantPanelMediator(application.enseignantPanel));
			facade.registerMediator(new ServicePanelMediator(application.servicePanel));
			facade.registerMediator(new DroitUtilisateurPanelMediator(application.droitUtilisateurPanel));
			facade.registerMediator(new ProfilEnseignantPanelMediator(application.profilEnseignantPanel));
			facade.registerMediator(new AnneeUniversitairePanelMediator(application.anneeUniversitairePanel));
		 } 
		 
		 /**
		 *  Get the application 
		 */ 
		 private function get application(): LucyID 
		 { 
			 return viewComponent as LucyID; 
		 }
	}
}
